package nan.nanfang.entity;

import java.util.ArrayList;
import java.util.List;
import java.util.SimpleTimeZone;

public class Student {
    // 属性
    private String brand;
    private int price;
    private String name;
    private List<String> contacts; // 联系人列表

    @Override
    public String toString() {
        return "Student{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                ", name='" + name + '\'' +
                ", contacts=" + contacts +
                '}';
    }

    public Student(String brand, int price, String name, List<String> contacts) {
        this.brand = brand;
        this.price = price;
        this.name = name;
        this.contacts = contacts;
    }

    public Student(){
        super();
    }
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getContacts() {
        return contacts;
    }

    public void setContacts(List<String> contacts) {
        this.contacts = contacts;
    }

    public void shangWang(){
        System.out.println("上网..");
    }


    public void faSongXix(String receiver, String message) {
        if (contacts.contains(receiver)) {
            System.out.println(name + " 发送给 " + receiver + " 的信息: " + message);
        } else {
            System.out.println(name + " 无法发送信息给 " + receiver + "，该联系人不在列表中");
        }
    }
}
